<h3 class="title1 ico1">Danh sách File Excel Của năm</h3>
<table class="tbl" cellspacing="0" cellpadding="0" border="0">
<thead>
	<tr>
    	<th width="50">{{helper:lang line='global:stt'}}</th>
        <th width="200">{{helper:lang line='users:full_name'}}</th>
        <th width="100">{{helper:lang line='users:position'}}</th>
        <th width="90">{{helper:lang line='salary:bhxh'}}</th>
        <th width="90">{{helper:lang line='salary:bhyt'}}</th>
        <th width="90">{{helper:lang line='salary:bhtn'}}</th>
		<th width="90">{{helper:lang line='salary:thuc_lanh'}}</th>
		<th>{{helper:lang line='salary:ky_ten'}}</th>
    </tr>
   
    <tbody>
    	<?php if(!empty($list_employ)) foreach($list_employ as $name_room => $value){?>
            	<tr> 
                	<td class="title_room" colspan="8" style="font-weight:bold;font-size:15px;color:#FF8A00"><?php echo $name_room?></td>
                </tr>
                <?php $i=0; if(!empty($value)) foreach($value as $item){$i++;
					$info = json_decode($item["info"]);
					if(in_array($item["room_id"],$list_idroom))
						$date_work = $date->value2;
					else
						$date_work = $date->value1;	
					$date_l = ($date_work == 0) ? 0 : $date_work - $item["date_n"] - $item["date_s"];
					$tongthunhap    = ($item["salary_add1"]+$item["salary_add5"]+(($item["salary_add4"]/$date_work)*$date_l)) + (($item["salary2"]/$date_work)*$date_l)+(($item["salary"]/$date_work)*$item["date_s"])  + $item["except1"];
					
					if($info->status == 1){
						$baohiemtong  	= ($item["salary"]*9.5)/100;
						$bhxh =  ($item["salary"]*7)/100;
						$bhyt =  ($item["salary"]*1.5)/100;
						$bhtn =  ($item["salary"]*1)/100;
					}
					else{
						$bhxh =  0;
						$bhyt =  0;
						$bhtn =  0;
						$baohiemtong = 0;
					}
					$total_khoantru  = $item["except5"]+$item["minus"]+($item["salary"]/100)+$baohiemtong;
					$total_thuclanh = round($tongthunhap-$total_khoantru,-3);
					$total_thuclanh = round($total_thuclanh,-3);
				?>
                <tr>
                        <td> <?php echo $i?></td>
                        <td class="upc tl"> <?php echo $item["name_full"]?></td>
                        <td> <?php echo $item["chucvu"]?></td>
                        <td class="tr"> <?php echo number_format($bhxh)?></td>
                        <td class="tr"> <?php echo number_format($bhyt)?></td>
                        <td class="tr"> <?php echo number_format($bhtn)?></td>
                        <td class="tr"> <?php echo number_format($total_thuclanh)?></td>
						<td></td>
                </tr>
                <?php }?>
        <?php }?>
	</tbody>	
</thead>
</table>